<%--
  Created by IntelliJ IDEA.
  User: xiaoji
  Date: 2017/2/23
  Time: 16:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools"/>
<script type="text/javascript" src="${webRoot}/plug-in/fancybox/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="${webRoot}/plug-in/fancybox/fancybox/jquery.fancybox-1.3.4.js"></script>
<link rel="stylesheet" type="text/css" href="${webRoot}/plug-in/fancybox/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
<div class="easyui-layout" fit="true">
    <div region="center" style="padding:1px;">
        <t:datagrid name="bankList" title="" actionUrl="aCustomerController.do?datagrid" idField="customerId" fit="true"
                    queryMode="group" onLoadSuccess="bandImg">
            <t:dgCol title="customerId" field="customerId" hidden="true"></t:dgCol>
            <t:dgCol title="咨询师头像" field="avatar"  extendParams="formatter:avatarFormatter;" align="center"></t:dgCol>
            <t:dgCol title="昵称" field="nickname" query="true"></t:dgCol>
            <t:dgCol title="姓名" field="realname" query="true"></t:dgCol>
            <t:dgCol title="性别" field="sex" dictionary="sex"></t:dgCol>
            <t:dgCol title="手机号码" field="phone"></t:dgCol>
            <t:dgCol title="生日" field="birthday" formatter="yyyy-MM-dd" query="true" ></t:dgCol>
            <t:dgCol title="省" field="province"  ></t:dgCol>
            <t:dgCol title="市" field="city" ></t:dgCol>
            <t:dgCol title="区" field="area"  ></t:dgCol>
            <t:dgCol title="情感状态" field="qgzt"  dictionary="qgzt"></t:dgCol>
            <t:dgCol title="最后登录" field="lastLogintime" formatter="yyyy-MM-dd"  ></t:dgCol>
            <t:dgCol title="是否封号" field="status"   dictionary="isno"></t:dgCol>

            <t:dgCol title="common.operation" field="opt" width="1"></t:dgCol>
            <t:dgConfOpt message="是否对选择用户封号?" url="aCustomerController.do?disable&customerId={customerId}&status=1" title="封号" exp="status#eq#0"></t:dgConfOpt>
            <t:dgConfOpt message="是否解封用户?" url="aCustomerController.do?disable&customerId={customerId}&status=0" title="解封" exp="status#eq#1"></t:dgConfOpt>
            <t:dgFunOpt funname="f_record(customerId)" title="交易记录" ></t:dgFunOpt>
        </t:datagrid>
    </div>
</div>
<script type="text/javascript">
    function avatarFormatter(val,row){
        return '<a rel="datagrid_group" href="'+val+'" title=""><img alt="" src="'+val+'" style="width:30px;height:30px;"></a>';
    }
    function bandImg(){
        $("a[rel=datagrid_group]").fancybox({
            'overlayShow'	: false,
            'transitionIn'	: 'elastic',
            'transitionOut'	: 'elastic'
        });
    }
    //交易记录
    function f_record(customerId){
        url = "capitalController.do?view&customerId="+customerId;
        title = "交易记录";
        createdetailwindow(title,url,700,400);
    }


</script>
